package com.twl.test;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;

public class BeanFaoctoryHolder implements BeanFactoryAware {

	private static BeanFactory beanFactory;
	
	
	@Override
	public void setBeanFactory(BeanFactory arg0) throws BeansException {
		this.beanFactory = arg0;
		
	}

	
	public static Object getBean(String name){
		return beanFactory.getBean(name);
	}
}
